import type { Metadata } from 'next'; import Link from 'next/link'; import { notFound } from 'next/navigation'; import { KV, Row } from '@/components/ui/key-value'; import { Container, Note } from '@/components/ui/section'; import { api, ApiError } from '@/lib/api'; import { fmtDateTime, fmtInt } from '@/lib/format'; import { routes } from '@/lib/site'; export const revalidate = 3600; export const metadata: Metadata = { title: 'Snapshot', robots: { index: false } }; export default async function SnapshotPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; let s; try { s = await api.snapshot(id); } catch (e) { if (e instanceof ApiError && e.notFound) notFound(); throw e; } return (

Snapshot · version {s.version_no}

{s.title ?? 'Normalised page version'}

Fetched {fmtDateTime(s.fetched_at)} ·{' '} sensor {s.previous_snapshot_id && ( <> {' · '} diff against previous version )}

Semantic blocks as observed

{s.blocks?.length ? (
    {s.blocks.map((b) => (
  1. {b.kind} · {b.path}

    {b.text}

  2. ))}
) : (
{s.text}
)}
); }